package ch.elca.lol.cake;

import ch.elca.lol.puissance4.board.Board;
import ch.elca.lol.puissance4.board.FastImBoard;
import ch.elca.lol.puissance4.game.Token;
import ch.elca.lol.puissance4.game.Util;
import ch.elca.lol.puissance4.player.Player;
import ch.elca.lol.puissance4.player.RandomAI;

public class CakeTest {
	public static void main(String... args) {
		Board b = new FastImBoard(7, 6);
		b = b.play(0, Token.X);
		b = b.play(0, Token.X);
		b = b.play(0, Token.X);
		System.out.println(b);
	}
	
	public static void ai() {
		Board b = Util.fromString("....... ....... ....... O...... X...... OOX....", 7, 6);
		// Board b = getBoard();
		System.out.println(b);
		
		Token toPlay = Token.O;
		
		Player sp = new RandomAI();
		sp.setToken(toPlay);
		
		int col = sp.play(b);
		System.out.println(b.play(col, toPlay));
	}
	
	protected static Board getBoard() {
		Board b = new FastImBoard(7, 6);
		b = b.play(2, Token.O);
		b = b.play(2, Token.O);
		b = b.play(2, Token.O);
		b = b.play(4, Token.X);
		b = b.play(4, Token.X);
		b = b.play(4, Token.X);
		
		// b = b.play(4, Token.X);
		// b = b.play(0, Token.X);
		// b = b.play(0, Token.X);*/
		
		return b;
	}
}
